
package com.oazon.moco.playlist.bean;

/**
 * <p>Java class for itemType.
 * 
 * <p>The following schema fragment specifies the expected content contained within this class.
 * <p>
 * <pre>
 * &lt;simpleType name="itemType">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="artist"/>
 *     &lt;enumeration value="album"/>
 *     &lt;enumeration value="genre"/>
 *     &lt;enumeration value="playlist"/>
 *     &lt;enumeration value="track"/>
 *     &lt;enumeration value="search"/>
 *     &lt;enumeration value="stream"/>
 *     &lt;enumeration value="show"/>
 *     &lt;enumeration value="program"/>
 *     &lt;enumeration value="favorites"/>
 *     &lt;enumeration value="favorite"/>
 *     &lt;enumeration value="collection"/>
 *     &lt;enumeration value="container"/>
 *     &lt;enumeration value="albumList"/>
 *     &lt;enumeration value="trackList"/>
 *     &lt;enumeration value="artistTrackList"/>
 *     &lt;enumeration value="other"/>
 *   &lt;/restriction>
 * &lt;/simpleType>
 * </pre>
 * 
 */
public enum ItemType {

    ARTIST("artist"),
    ALBUM("album"),
    GENRE("genre"),
    PLAYLIST("playlist"),
    TRACK("track"),
    SEARCH("search"),
    STREAM("stream"),
    SHOW("show"),
    PROGRAM("program"),
    FAVORITES("favorites"),
    FAVORITE("favorite"),
    COLLECTION("collection"),
    CONTAINER("container"),
    ALBUM_LIST("albumList"),
    TRACK_LIST("trackList"),
    ARTIST_TRACK_LIST("artistTrackList"),
    OTHER("other");
    
    private final String value;

    ItemType(String v) {
        value = v;
    }

    public String value() {
        return value;
    }

    public static ItemType fromValue(String v) {
        for (ItemType c: ItemType.values()) {
            if (c.value.equals(v)) {
                return c;
            }
        }
        throw new IllegalArgumentException(v);
    }

}
